]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st/widget: Invalidate paint volume on style changes
authorJonas Dreßler <verdre@v0yd.nl>
Fri, 12 Mar 2021 21:30:43 +0000 (22:30 +0100)
committerMarge Bot <marge-bot@gnome.org>
Mon, 12 Apr 2021 17:08:23 +0000 (17:08 +0000)
StWidget is overriding ClutterActors get_paint_volume() vfunc to adjust
for overpaint of things like box shadows that get set in CSS, it does
that by setting the paint volume to the theme nodes paint box.

Since StWidget can't really get notified when the paint box changes, we
just invalidate the paint volume when the theme nodes paint_equal()
returns FALSE.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1484>

src/st/st-widget.c

index 7e03028c0d2b367a567bb0989acc329d8fbf509b..47a84c5c2de11668da28d00d464e6db9a38bacf0 100644 (file)
@@ -1722,6 +1722,8 @@ st_widget_recompute_style (StWidget    *widget,
 
   if (!paint_equal)
     {
+      clutter_actor_invalidate_paint_volume (CLUTTER_ACTOR (widget));
+
       next_paint_state (widget);
 
       if (!st_theme_node_paint_equal (new_theme_node, current_paint_state (widget)->node))